<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" 
	import="java.util.*,my_web.bean.*" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%--
	Emp emp=(Emp)request.getAttribute("Emp");
	//获取request数据结果--部门表
	List<Dep> Deps=(List<Dep>)request.getAttribute("DepList");
	//获取request数据结果--职位表
 	List<Pos> Poss=(List<Pos>)request.getAttribute("PosList");
--%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/bootstrap.min.css" rel="stylesheet">
<title>修改员工信息</title>
</head>
<body>
<div class="container-fluid" style="padding-left:2px;padding-right:2px;">
	<ol class="breadcrumb" style="margin-bottom:5px;">
	  <li>基础信息</li>
	  <li>员工信息</li>
	  <li class="active">修改</li>
	</ol>
	<form action="EmpDoUpd.do" method="post" style="padding-left:300px">
		  <div class="form-group">
			    <label for="e_id">员工编号</label>
			    <input type="text" class="form-control" id="e_id" name="e_id" value="${Emp.e_id}" readonly="readonly" style="width:300px">
		  </div>
		  <div class="form-group">
			    <label for="d_id">部门名称</label>
			    <select name="bumen">
				<%--
				for(Dep dep:Deps){
					String selected="";
					if(emp.getD_id().equals(dep.getD_id())){
						selected="selected";
					}
				--%>
				<option value="0">==选择部门编号</option> 
				<c:forEach items="${DepList}" var="dep">
					<option value ="${dep.d_id }" ${dep.d_id==Emp.d_id?'selected':'' }>${dep.d_name}</option>
				</c:forEach>	
				<%--
				}
				--%>
				</select>
		  </div>
		   <div class="form-group">
			    <label for="e_name">员工名称</label>
			    <input type="text" class="form-control" id="e_name" name="e_name" value="${Emp.e_name}" style="width:300px">
		  </div>
		  <div class="form-group">
			    <label for="e_state">员工状态</label>
			    <input type="radio" name="e_state" value="在职" ${Emp.e_state eq '在职'?'checked':''} checked="checked"/>在职
				<input type="radio" name="e_state" value="离职" ${Emp.e_state eq '离职'?'checked':''} />离职 
		  </div>
		  <div class="form-group">
			    <label for="p_id">职位名称</label>
			     <select name="zhiwei">
				<%--
				for(Pos pos:Poss){
				--%>
				<%--<option value ="<%=pos.getP_id()%>" <%=emp.getP_id().equals(pos.getP_id())?"selected":""%>><%=pos.getP_name()%></option>--%>
				<option value="0">==选择职位编号</option> 
				<c:forEach items="${PosList}" var="pos">
					<option value ="${pos.p_id }" ${pos.p_id==Emp.p_id?'selected':''}>${pos.p_name}</option>
				</c:forEach>	
				<%--
				}
				--%>
				</select>
		  </div>
	  <button type="submit" class="btn btn-default" id="bt1">提交</button>
	</form>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery-3.3.1.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript">
	document.getElementById("bt1").onclick=function(){
		return confirm("你确定要修改该员工的信息？想好了哦！");
	}
</script>
</body>
</html>